import java.util.*;

public class demo10 {
    public static void main1(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String a=scanner.next();
        String b=scanner.next();
        String c=scanner.next();
        String d=scanner.next();
        Map<String,Integer>map=new TreeMap<>();
        map.put(a, map.getOrDefault(a,0)+1);
        map.put(b, map.getOrDefault(b,0)+1);
        map.put(c, map.getOrDefault(c,0)+1);
        map.put(d, map.getOrDefault(d,0)+1);
        StringBuilder stringBuilder=new StringBuilder();
        for(Map.Entry<String,Integer> entry:map.entrySet()){
            stringBuilder.append(entry.getKey());
            if(entry.getValue()!=1){
                int x=entry.getValue();
                while (x!=1){
                    x--;
                    stringBuilder.append(entry.getKey());
                }
            }
        }
        System.out.println(stringBuilder);
    }
    //方法二  比自己相的简洁明了
    public static void main(String []args){
        Scanner scanner=new Scanner(System.in);
        String []strings=new String[4];
        for (int i = 0; i <4 ; i++) {
            strings[i]=scanner.next();
        }
        Arrays.sort(strings);//思路重点
        StringBuilder stringBuilder=new StringBuilder();
        for (String s:strings) {
            stringBuilder.append(s);
        }
        System.out.println(stringBuilder);
    }
}
